﻿using ApiGateway;
using HttpApiGateway;
using HttpApiGateway.Model;
using RpcClient;
using Wedonek.RpcStore.Gateway.Interface;
using Wedonek.RpcStore.Gateway.Model;
using Wedonek.RpcStore.Service.Model;

namespace Wedonek.RpcStore.Gateway.Controller
{
    /// <summary>
    /// 任务日志
    /// </summary>
    internal class TaskLogController : ApiController
    {
        private readonly IAutoTaskLogService _Server = null;
        public TaskLogController(IAutoTaskLogService service)
        {
            this._Server = service;
        }
        /// <summary>
        /// 查询任务日志
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public PagingResult<AutoTaskLog> Query(PagingParam<TaskLogQuery> param)
        {
            AutoTaskLog[] list = this._Server.Query(param.Param, param.ToBasicPaging(), out long count);
            return new PagingResult<AutoTaskLog>(list, count);
        }
    }
}
